'use strict';

const Service = require('egg').Service;

class UserService extends Service {
  async getUsertList(){
    // const user = await this.app.mysql.get('user', {id: 1});
    const users = await this.app.mysql.select('user');
    return users;
  }
  async getUser(params){
    const user = await this.app.mysql.get('user', {id: params.id});
    return user;
  }
  async addOneUser(params){
    console.log(params)
    const user = await this.app.mysql.get('user', params);
    return user;
  }
}

module.exports = UserService;
